package com.xunce.xcworkservice.utils;

import org.springframework.util.DigestUtils;

import java.nio.charset.StandardCharsets;

/**
 * @ClassName: PasswordUtil
 * @Author: yanlong.guo
 * @Date: 2023/12/19 10:51
 */
public class PasswordUtil {
    public static final String SALT = "labor-hour";
    public static String encryptByMD5(String str){
        return DigestUtils.md5DigestAsHex((str + SALT).getBytes(StandardCharsets.UTF_8));
    }
}
